/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package vn.com.fis.portal.vtcc.service.persistence;

import com.liferay.portal.service.persistence.BasePersistence;

import vn.com.fis.portal.vtcc.model.StrainEntry;

/**
 * The persistence interface for the strain entry service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author loind
 * @see StrainEntryPersistenceImpl
 * @see StrainEntryUtil
 * @generated
 */
public interface StrainEntryPersistence extends BasePersistence<StrainEntry> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link StrainEntryUtil} to access the strain entry persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the strain entry in the entity cache if it is enabled.
	*
	* @param strainEntry the strain entry
	*/
	public void cacheResult(
		vn.com.fis.portal.vtcc.model.StrainEntry strainEntry);

	/**
	* Caches the strain entries in the entity cache if it is enabled.
	*
	* @param strainEntries the strain entries
	*/
	public void cacheResult(
		java.util.List<vn.com.fis.portal.vtcc.model.StrainEntry> strainEntries);

	/**
	* Creates a new strain entry with the primary key. Does not add the strain entry to the database.
	*
	* @param strainId the primary key for the new strain entry
	* @return the new strain entry
	*/
	public vn.com.fis.portal.vtcc.model.StrainEntry create(long strainId);

	/**
	* Removes the strain entry with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param strainId the primary key of the strain entry
	* @return the strain entry that was removed
	* @throws vn.com.fis.portal.vtcc.NoSuchStrainEntryException if a strain entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public vn.com.fis.portal.vtcc.model.StrainEntry remove(long strainId)
		throws com.liferay.portal.kernel.exception.SystemException,
			vn.com.fis.portal.vtcc.NoSuchStrainEntryException;

	public vn.com.fis.portal.vtcc.model.StrainEntry updateImpl(
		vn.com.fis.portal.vtcc.model.StrainEntry strainEntry, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the strain entry with the primary key or throws a {@link vn.com.fis.portal.vtcc.NoSuchStrainEntryException} if it could not be found.
	*
	* @param strainId the primary key of the strain entry
	* @return the strain entry
	* @throws vn.com.fis.portal.vtcc.NoSuchStrainEntryException if a strain entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public vn.com.fis.portal.vtcc.model.StrainEntry findByPrimaryKey(
		long strainId)
		throws com.liferay.portal.kernel.exception.SystemException,
			vn.com.fis.portal.vtcc.NoSuchStrainEntryException;

	/**
	* Returns the strain entry with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param strainId the primary key of the strain entry
	* @return the strain entry, or <code>null</code> if a strain entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public vn.com.fis.portal.vtcc.model.StrainEntry fetchByPrimaryKey(
		long strainId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the strain entries.
	*
	* @return the strain entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<vn.com.fis.portal.vtcc.model.StrainEntry> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the strain entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of strain entries
	* @param end the upper bound of the range of strain entries (not inclusive)
	* @return the range of strain entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<vn.com.fis.portal.vtcc.model.StrainEntry> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the strain entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of strain entries
	* @param end the upper bound of the range of strain entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of strain entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<vn.com.fis.portal.vtcc.model.StrainEntry> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the strain entries from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of strain entries.
	*
	* @return the number of strain entries
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the sample entries associated with the strain entry.
	*
	* @param pk the primary key of the strain entry
	* @return the sample entries associated with the strain entry
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<vn.com.fis.portal.vtcc.model.SampleEntry> getSampleEntries(
		long pk) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the sample entries associated with the strain entry.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the strain entry
	* @param start the lower bound of the range of strain entries
	* @param end the upper bound of the range of strain entries (not inclusive)
	* @return the range of sample entries associated with the strain entry
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<vn.com.fis.portal.vtcc.model.SampleEntry> getSampleEntries(
		long pk, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the sample entries associated with the strain entry.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the strain entry
	* @param start the lower bound of the range of strain entries
	* @param end the upper bound of the range of strain entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of sample entries associated with the strain entry
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<vn.com.fis.portal.vtcc.model.SampleEntry> getSampleEntries(
		long pk, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sample entries associated with the strain entry.
	*
	* @param pk the primary key of the strain entry
	* @return the number of sample entries associated with the strain entry
	* @throws SystemException if a system exception occurred
	*/
	public int getSampleEntriesSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the sample entry is associated with the strain entry.
	*
	* @param pk the primary key of the strain entry
	* @param sampleEntryPK the primary key of the sample entry
	* @return <code>true</code> if the sample entry is associated with the strain entry; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsSampleEntry(long pk, long sampleEntryPK)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the strain entry has any sample entries associated with it.
	*
	* @param pk the primary key of the strain entry to check for associations with sample entries
	* @return <code>true</code> if the strain entry has any sample entries associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsSampleEntries(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;
}